<!-- QuestionCard.vue -->
<template>
  <div class="question-card">
    <!-- 头部区域 -->
    <div class="header">
      <div class="creator-info">
        <img :src="avatarUrl" alt="创建人头像" />
        <span>无畏的小博</span>
      </div>
      <div class="title">提问</div>
    </div>

    <!-- 内容区域 -->
    <div class="content">
      请问如果我学习java的话大概的学习路线是怎样的？学习完java寄出后我要怎么做
    </div>

    <!-- 底部区域 -->
    <div class="footer">
      <div class="tags">
        <el-tag type="success">学习方法</el-tag>
        <el-tag type="primary">Java</el-tag>
      </div>
      <div class="actions">
        <el-icon><Star /></el-icon><span>1</span> <el-icon><ChatLineSquare /></el-icon
        ><span>2</span> <el-icon><Share /></el-icon><span>3</span>
      </div>
      <div class="expand-button">
        <el-icon><ArrowDownBold /></el-icon>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { ElTag } from 'element-plus'
import 'element-plus/dist/index.css'

const avatarUrl = ref('https://placekitten.com/50/50') // 头像URL
</script>

<style scoped>
.question-card {
  background-color: #ff9999;
  border-radius: 10px;
  width: 500px; /* 调整宽度 */
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px; /* 调整字体大小 */
}

.creator-info {
  display: flex;
  align-items: center;
}

.creator-info img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  margin-right: 10px;
}

.title {
  font-size: 16px; /* 调整字体大小 */
  font-weight: 600;
  color: #ff4d4d;
}

.content {
  background-color: #ffcccc;
  padding: 20px; /* 调整内边距 */
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 18px; /* 调整字体大小 */
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px; /* 调整字体大小 */
}

.tags {
  display: flex;
  gap: 10px;
}

.actions {
  display: flex;
  gap: 5px;
  align-items: center;
}
</style>
